package com.small.admin.entity;

import lombok.Data;
import java.io.Serializable;
import javax.persistence.*;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import com.small.common.util.val.group.ValAdd;
import com.small.common.util.val.group.ValUpdate;

import java.util.Date;

/**
 * 作者: guoshun
 * 邮箱: 2855052663@qq.com
 * 时间: 2018-10-26 16:21:00
 * 描述: 系统用户
 */
@Data
@Table(name = "sys_user")
public class SysUser implements Serializable {

	private static final long serialVersionUID = 1L;

		@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long userId;
	
	//用户名
	@NotEmpty(groups = {ValAdd.class})
	@Column(name = "username")
    private String username;
	
	//密码
	@Length(min = 6, max = 30, groups = {ValAdd.class})
	@Column(name = "password")
    private String password;
	
	//邮箱
	@Column(name = "name")
    private String name;
	
	//区域id
	@Column(name = "area_id")
    private Long areaId;
	
	//状态  0：禁用   1：正常
	@Column(name = "status")
    private Integer status;
	
	//创建者ID
	@Column(name = "create_user_id")
    private Long createUserId;
	
	//创建时间
	@Column(name = "create_time")
    private Date createTime;
	
}
